<extend name="layout:index"/>

<block name="content">
	<body>

    <div class="wrapper wrapper-content animated fadeInRight">
      <div class="row">
      <div class="tabs-container">
		   
      <div class="tab-content">
       <div id="tab-1" class="tab-pane active">
           <div class="panel-body">
			<div class="col-sm-6">
			  <div class="ibox float-e-margins">
			      <div class="ibox-content">
			          <form class="form-horizontal m-t" action="__MODULE__/user/actjh" id="signupForm" method="post" onSubmit="return checkForm(this)">
			              <div class="form-group">
			                  <label class="col-sm-3 ">用户名</label>
			                  <div class="col-sm-8">
		                          <input id="name1" name="name1" class="form-control" type="text">
		                      </div>
	              		 </div>
	              		 <div class="form-group">
			                  <label class="col-sm-3 ">会员ID</label>
			                  <div class="col-sm-8">
		                          <input id="id1" name="id1" class="form-control" type="text">
		                      </div>
	              		 </div>
	              		<div class="form-group">
			                  <label class="col-sm-3 ">请输入安全密码</label>
			                  <div class="col-sm-8">
		                          <input id="repassword1" name="repassword1" class="form-control" type="password">
		                      </div>
	              		</div>
	              		
	              		<div class="form-group">
                        <div class="col-sm-12 " style="margin-top:30px">
                        	<a data-toggle="" data-target="" >
                        		<input class="btn" type="submit" value="激活"  style="background-color: #378cbe;color:white;width: 100%;height: 40px">
                        	</a>
                        </div>
                    </div>
			           </form>
			       </div>
			   </div>
			</div>
			<div class="col-sm-6">
			  <div class="ibox float-e-margins">
			      <div class="ibox-content">
			      	<div class="table-responsive">
					<table class="table table-bordered table-striped table-hover">
						<thead>
							<tr align="center"> 
								<th>用户名</th>
								<th><center>会员ID</center></th>
								<th>会员等级</th>
								<th>注册时间</th>
								<th>操作</th>
							</tr>
						</thead>
							
						<tbody>
							<volist name="user" id="vo">
							<tr>
								<td class='addjihuo1'>{$vo.user_name}</td>
								<td class='addjihuo2'>{$vo.user_id}</td>
								<td>
									<if condition='$vo.user_type eq 3'>
										VIP1
									<elseif condition='$vo.user_type eq 5' />
										VIP2
									<elseif condition='$vo.user_type eq 10' />
										VIP3
									<elseif condition='$vo.user_type eq 30' />
										VIP4
									<elseif condition='$vo.user_type eq 50' />
										VIP5
									<else />
										VIP6
									 </if>
								</td>
								<td>{:date('Y-m-d H:i:s',$vo['reg_time'])}</td>
								<td><a href="__MODULE__/user/delete?dd={$vo.user_id}">删除</a></td>
							</tr>
							</volist>
						</tbody>

						</table>
						<div class="">

 				<div id="pager">
  					<span style="margin-right:10px;">总计 <b>{$count}</b>  个记录</span>
      
     			</div>


</body>
<script>
	function checkForm(){
		$('.btn').attr('disabled',true);
		var a = $('#name1').val();
		var b = $('#id1').val();
		var c = $('#repassword1').val();
		if(a==''){
			var txt=  "用户名不能为空";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
			return false;
		}
		if(b==''){
			var txt=  "ID不能为空";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
			return false;
		}
		if(c==''){
			var txt=  "安全码不能为空";
			window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
			return false;
		}
	}
	

//激活用户
	$('.addjihuo1').click(function(){		
		$('#name1').val($(this).html());
		$('#id1').val($(this).next().html());
	})
	$('.addjihuo2').click(function(){		
		$('#name1').val($(this).prev().html());
		$('#id1').val($(this).html());
	})


</script>

</block>